/*
 * Copyright (c) 2020 pie4cloud Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.pie4cloud.pie.codegen.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pie4cloud.pie.common.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 数据源表
 *
 * @author zzj
 * @date 2019-03-31 16:00:20
 */
@Data
@TableName("gen_datasource_conf")
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "GEN_DATASOURCE_CONF")
public class GenDatasourceConf extends BaseEntity {

	/**
	 * 主键
	 */
	@Id
	@TableId(value = "id", type = IdType.ASSIGN_ID)
	@Column(name = "ID",length = 11)
	private Long id;

	/**
	 * 名称
	 */
	@Column(name = "NAME",length = 64)
	private String name;

	/**
	 * jdbcurl
	 */
	@Column(name = "URL",length = 512)
	private String url;

	/**
	 * 用户名
	 */
	@Column(name = "USERNAME",length = 64)
	private String username;

	/**
	 * 密码
	 */
	@Column(name = "PASSWORD",length = 64)
	private String password;


	@Column(name = "DRIVER_CLASS_NAME",length = 255)
	private String driverClassName;

	/**
	 * 删除标记
	 */
	@TableLogic
	@Column(name = "DEL_FLAG",length = 1,columnDefinition = "VARCHAR(1) DEFAULT '0'")
	private String delFlag;

}
